"use strict"
const log4js = require('log4js');
const path = require("path");
const catalog = path.join(__dirname, 'logs');
log4js.configure({
    appenders: {
        out: { type: 'stdout' },
        info: {
            type: 'dateFile',
            filename: catalog + '/info',
            pattern: '-yyyy-MM-dd.log',
            layout: {
                type: 'pattern',
                pattern: '%d{yyyy-MM-ddThh:mm:ss.SSSO} %p %c - [%m]'
            }
        },
      
    },
    categories: {
        default: { appenders: ['out','info'], level: 'all' },
    },  
    pm2: true,
    // disableClustering: true
});

module.exports = log4js; 